Returns:
Calculating Stock Returns


Kerry Back

BUSI 721, Fall 2022
JGSB, Rice University

Daily Returns

  • Let’s compute close-to-close daily stock returns. Let Pt denote the price at close on day t.

  • If there are no dividends, then the gain on day t is Pt - Pt-1.

The return per $1 invested in a share at close on t-1 is

\[(P_t - P_{t-1}) / P_{t-1}\]

What about dividends?  A Chevron announcement

Chevron’s Fall 2021 Dividend

Nasdaq’s statement

Chevron Corporation (CVX) will begin trading ex-dividend on August 18, 2021. A cash dividend payment of $1.34 per share is scheduled to be paid on September 10, 2021. Shareholders who purchased CVX prior to the ex-dividend date are eligible for the cash dividend payment.

Three Dates:

  • August 18: (begins trading ex-dividend)
  • August 19: (shareholders of record receive the dividend)
  • September 10: (dividend is paid)

Ex-dividend days

  • If you buy on Aug 18, you are not entitled to the dividend.

  • Purchase Aug 17 or before (and hold through Aug 17)

    • → will be shareholder of record on Aug 19
    • → receive dividend on Sept 10
  • Why Aug 17 → Aug 19?

    • T+2 settlement

  • How to compute daily returns in August?
  • Where does the dividend go?
  • Or does it go in September?
  • If you buy at close on Aug 17 and sell at close on Aug 18, you get the Aug 18 price plus the dividend in September, so the dividend is part of your return.
  • If you buy at close on any other day and sell at close on the following day, the dividend is not part of your return.
  • The dividend goes on the ex day. CVX Aug 18 return is \((P_{\text{Aug18}} + 1.34 - P_{\text{Aug17}})/P_{\text{Aug17}}\).

Compounding returns

We can compound daily returns to get weekly, monthly, or annual returns.

\[ (1+r_1)(1+r_2)...(1+r_N)-1 \]


If we put the dividend on the ex-day, the weekly, etc. returns are as if the dividend was received on the ex day and reinvested in new shares.

Stock splits

If a company does an \(n\)-for-1 stock split, then each shareholder gets \(n\) new shares for each of her existing shares. Shares are worth roughly \(1/n\) as much.

Split adjusted prices


Data vendors routinely compute split-adjusted prices, scaling down old prices by the same factor for comparability to new prices.

Yahoo’s adjusted prices

  • finance.yahoo.com is a good source for data, and there are python libraries that interface with its API.

  • Yahoo’s adjusted closing prices are adjusted for splits and also adjusted for dividends on each ex date.

  • On Aug 18, 2021, the Aug 17 price was adjusted as

\[ {\hat{P}_{\text{Aug17}}}={P_{\text{Aug17}}}-1.34 \]

  • The idea is that 1.34 of the value of CVX at close on Aug 17 was the value of the dividend. The adjusted price is the value without right to the dividend.

All prior adjusted prices were re-adjusted on Aug 18 by the factor

\[ {\hat{P}_{\text{Aug17}}}/{P_{\text{Aug17}}} \]

The result is that on days t are not ex days,

\[ \frac{\hat{P}_{t}}{\hat{P}_{t-1}}=\frac{P_{t}}{P_{t-1}}=1+r_t \]

On ex days,

\[ \frac{\hat{P}_{t}}{\hat{P}_{t-1}}=\frac{P_{t}}{P_{t-1}-D_t} = 1 + \hat{r}_t \]

CVX on Aug 18, 2021

\[ \hat{r}_t = \frac{P_{t}}{P_{t-1}-D_t} - 1=-0.0271 \]

\[ r_t = \frac{P_{t}+D_t}{P_{t-1}} - 1 =-0.0267 \]

Getting Returns from Yahoo

!pip install --upgrade pandas-datareader

from pandas_datareader import DataReader as pdr

price = pdr('cvx', 'yahoo', start=2010)['Adj Close']
ret_daily = price.pct_change()

Compounding Yahoo returns

Can get monthly or annual return as % change in monthly or annual Yahoo-adjusted closing prices - equivalent to compounding Yahoo daily returns.

price = pdr('cvx', 'yahoo', start=2010)['Adj Close']
ret_monthly = price.resample('M').last().pct_change()
ret_annual = price.resample('Y').last().pct_change()

# change datetime to monthly or annual (optional)

ret_monthly.index = ret_monthly.index.to_period('M')
ret_annual.index = ret_annual.index.to_period('Y')